<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@include file="/WEB-INF/commit/head.jsp" %>


<div class="layui-body">
	<div style="padding: 15px;">资讯管理</div>
	<div class="layui-btn-group rolemanager">
		<button class="layui-btn" data-type ="add">增加</button>
		<button class="layui-btn" data-type ="update">修改</button>
		<button class="layui-btn" data-type ="del" id="del">删除</button>
	</div>
	<div >
	
	
	</div>
	<table class="layui-table" id="msgTable">
	</table>
</div>
<div>
<script  type="text/html" id="msgstatusTpl">
  <div class="layui-form-item">
	{{#  if(d.msgstatus == 0){ }}
      <input type="checkbox" name="like[0]" title="不发布" checked>
 	{{#  } else { }}
      <input type="checkbox" name="like[1]" title="发布" checked>
   {{#  } }}
  </div>
</script>
<form id="fm" style="display:none" class="layui-form"  action="msg/doinsert.html" method="post"  enctype="multipart/form-data">
  <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block">
      <input type="text" name="msgname" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
    </div>
  </div>
    <div class="layui-form-item">
  <label class="layui-form-label">上传文件</label>
  <div class="layui-input-block">
  <input type="file" name="filemsgpath">
   </div>
   </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">普通文本域</label>
    <div class="layui-input-block">
      <textarea placeholder="请输入内容" class="layui-textarea" name="msgexplain"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态：</label>
    <div class="layui-input-block">
      <input type="radio" name="msgstatus" value="1" title="启用" checked>
      <input type="radio" name="msgstatus" value="0" title="禁用" >
    </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" id="btn">保存</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
</div>
<div>
<form id="fm_update" style="display:none" class="layui-form" lay-filter="msgUpdate" method="post" action="msg/doupdatre.html" enctype="multipart/form-data">
	 <input type="hidden" id="msgid" name="msgid" >
   <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block">
      <input type="text" name="msgname" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
    </div>
  </div>

   <div class="layui-form-item">
  <label class="layui-form-label">上传文件</label>
  <div class="layui-input-block">
  <input type="file" name="filemsgpath">
   </div>
   </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">普通文本域</label>
    <div class="layui-input-block">
      <textarea placeholder="请输入内容" class="layui-textarea" name="msgexplain"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态：</label>
    <div class="layui-input-block">
      <input type="radio" name="msgstatus" value="1" title="启用" checked>
      <input type="radio" name="msgstatus" value="0" title="禁用" >
    </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" id="btn">保存</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
</div>
<script type="text/html" id="msgnameTpl">
  <a href="msg/download.html?msgid={{d.msgid}}" class="layui-table-link" target="_self">{{ d.msgname }}</a>
</script>
<script src="./layer/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/msglist.js"></script>
<%@include file="/WEB-INF/commit/dibu.jsp" %>